<template>
    <div>
        <div style="text-align: center" v-if="props.showRadio">
            <a-radio-group v-model:value="paramsDate" button-style="solid" @change="changeParamsDate">
                <a-radio-button value="0">今日</a-radio-button>
                <a-radio-button value="1">近7日</a-radio-button>
                <a-radio-button value="2">近14日</a-radio-button>
            </a-radio-group>
        </div>

        <all-look-item :info-data="props.infoData" :paramsDate="paramsDate" />
    </div>
</template>
<script setup lang="ts">
    import { ref } from 'vue';
    import AllLookItem from '/@/components/secondaryScreen/secondMap/components/userInfoModal/allLookItem.vue';
    import { propTypes } from '/@/utils/propTypes';

    const props = defineProps({
        infoData: propTypes.object.def({}),
        showRadio: propTypes.bool.def(true),
    });

    const emit = defineEmits(['changeParamsDate']);

    const paramsDate = ref('0');

    function changeParamsDate(v) {
        emit('changeParamsDate', v.target.value);
    }
</script>
<style scoped lang="less"></style>
